def chinese_to_unicode(text):
    return text.encode('unicode_escape').decode('utf-8')


def unicode_to_chinese(unicode_text):
    return unicode_text.encode('utf-8').decode('unicode_escape')

# 示例
chinese_text = "ケースを取得するための思考プロセス"
unicode_text = chinese_to_unicode(chinese_text)
print(unicode_text)



# 示例
unicode_text = "\\u30AA\\u30D7\\u30B7\\u30E7\\u30F3\\u540D"
chinese_text = unicode_to_chinese(unicode_text)
print(chinese_text)


from googletrans import Translator

def translate_text(text, dest_language):
    translator = Translator()
    translated = translator.translate(text, src='zh-cn', dest=dest_language)
    return translated.text

# 中文文本
chinese_text = "ケースを取得するための思考プロセス"

# 翻译成日语
japanese_text = translate_text(chinese_text, 'ja')
print("日语:", japanese_text)

# 翻译成英语
english_text = translate_text(chinese_text, 'en')
print("英语:", english_text)
